import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("PK__u9_bom__3214EC278040E997", ["id"], { unique: true })
@Entity("u9_bom", { schema: "dbo" })
export class U9Bom {
  @Column("varchar", { name: "itemMaster", nullable: true, length: 255 })
  itemMaster: string | null;

  @Column("money", { name: "price", nullable: true })
  price: number | null;

  @Column("numeric", {
    name: "RunLaborHours",
    nullable: true,
    precision: 18,
    scale: 0,
  })
  runLaborHours: number | null;

  @Column("datetime2", { name: "create_time", nullable: true })
  createTime: Date | null;

  @Column("datetime2", { name: "update_time", nullable: true })
  updateTime: Date | null;

  @Column("bigint", { name: "create_by", nullable: true })
  createBy: string | null;

  @Column("bigint", { name: "update_by", nullable: true })
  updateBy: string | null;

  @Column("datetime2", { name: "delete_time", nullable: true })
  deleteTime: Date | null;

  @Column("nvarchar", { name: "create_user", nullable: true, length: 255 })
  createUser: string | null;

  @Column("nvarchar", { name: "update_user", nullable: true, length: 255 })
  updateUser: string | null;

  @PrimaryGeneratedColumn({ type: "int", name: "ID" })
  id: number;

  @Column("money", { name: "salary", nullable: true })
  salary: number | null;

  @Column("money", { name: "TotalMechanicalCost", nullable: true })
  totalMechanicalCost: number | null;

  @Column("money", { name: "PurchasedMaterialCost", nullable: true })
  purchasedMaterialCost: number | null;

  @Column("money", { name: "PurchasedMaterialPremium", nullable: true })
  purchasedMaterialPremium: number | null;

  @Column("money", { name: "ManufacturingCost", nullable: true })
  manufacturingCost: number | null;

  @Column("money", { name: "ElectricityCost", nullable: true })
  electricityCost: number | null;

  @Column("money", { name: "Interest", nullable: true })
  interest: number | null;
}
